﻿using Microsoft.FxCop.Sdk;
using System;
using System.Collections.Generic;
using System.Linq;

namespace MyCustomRules
{
    public class DetectClassRule : BaseIntrospectionRule
    {
        public DetectClassRule()
            : base(typeof(DetectClassRule).Name, "MyCustomRules.Metadata", typeof(DetectClassRule).Assembly)
        {
        }

        public override ProblemCollection Check(TypeNode type)
        {
            var resolution = GetResolution(type.FullName);
            Problems.Add(new Problem(resolution, type));
            return Problems;
        }
    }
}
